Skip to content

Conversation

compiler-errors
Copy link
Member

Let me know if you want me to commit the minimized test:

fn test() {}

fn test2() {}

fn main() {
    let tests: &[(_, fn())] = &[
        ("test", test),
        ("test2", test2),
    ];

    for (a, b) in tests {
        todo!();
    } 
}

In that test above, the match scrutinee is <std::vec::Iter<(&'static str, fn())> as Iterator>::Item, which we cannot peel the refs from.

We also need to structurally resolve in the loop, since structural resolve is inherently shallow. I haven't come up with a test where this matters, but I can if you care.

Also, I removed two other calls to resolve_vars_with_obligations in diagnostics code that I'm pretty convinced are not useful.

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 8, 2023
@compiler-errors compiler-errors changed the title Structurally resolve in pattern matching when peeling refs Structurally resolve in pattern matching when peeling refs in new solver Jul 8, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-structurally-resolve-pat branch 2 times, most recently from 94ae3a1 to 9f4a7d8 Compare July 8, 2023 05:11
@compiler-errors
Copy link
Member Author

(this will crash until #113335 lands)

@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-structurally-resolve-pat branch from 9f4a7d8 to e0c3280 Compare July 8, 2023 13:25
@rust-log-analyzer

This comment has been minimized.

@@ -638,7 +637,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let var_ty = self.local_ty(span, var_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know what check_binding_alt_eq_ty does and if so, can you add a comment to this method?

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me after rebase

@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-structurally-resolve-pat branch from e0c3280 to 9551d96 Compare July 10, 2023 16:59
@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-structurally-resolve-pat branch from 9551d96 to 846d54f Compare July 11, 2023 02:41
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Collaborator

bors commented Jul 11, 2023

📌 Commit 846d54f has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2023
@bors
Copy link
Collaborator

bors commented Jul 11, 2023

⌛ Testing commit 846d54f with merge 0a2681c...

@bors
Copy link
Collaborator

bors commented Jul 11, 2023

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 0a2681c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 11, 2023
@bors bors merged commit 0a2681c into rust-lang:master Jul 11, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0a2681c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.9% [3.9%, 3.9%] 1
Regressions ❌
(secondary)
2.4% [2.1%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) 3.9% [3.9%, 3.9%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 656.645s -> 656.683s (0.01%)

@compiler-errors compiler-errors deleted the new-solver-structurally-resolve-pat branch August 11, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants